#ifndef _TIMER_H_
#define _TIMER_H_

#include "stdint.h"
#include "stdbool.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef void (*TimerCallback)(void);

#define MAX_TIMERS_SIZE (10)
typedef struct 
{
    TimerCallback arrayCallback[MAX_TIMERS_SIZE];
    uint16_t nTimerCount[MAX_TIMERS_SIZE];
	uint16_t nTimerCountBak[MAX_TIMERS_SIZE];
	uint8_t nTimers;
}TimerCallback_t;



void Timer_Init(void);

// 创建定时器，精度为10ms
bool Create_Timer(TimerCallback cb, uint16_t nMilliSeconds);

#ifdef __cplusplus
}
#endif

#endif //_TIMER_H_




